<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<!--在这里写你的css-->
<div th:fragment="stylesheet">

</div>
<!--在这里写你的内容-->

<body th:fragment="content">

<div class="panel" style="padding: 10px">
    <div class="panel-heading">
        <h3 class="panel-title">添加客户</h3>
    </div>
    <form name="add_user">
        <!--<div class="panel-body">-->
        <div>
            <div class="box-body col-md-6">
                <label for="telephone">用户手机号码</label>
                <input id="telephone" type="text" class="form-control" placeholder="输入用户手机号码">
                <br>
                <label for="nickname">用户昵称</label>
                <input id="nickname" type="text" class="form-control" placeholder="输入用户昵称">
                <br>

                <label for="realName">真实姓名</label>
                <input id="realName" type="text" class="form-control" placeholder="输入真实姓名">
                <br>
                <label for="health_record_id">健康档案编号</label>
                <input id="health_record_id" type="text" class="form-control" placeholder="输入用户健康档案编号">
                <br>
                <label>用户性别</label>
                <div>
                    <label class="fancy-radio">
                        <input name="gender" value="male" type="radio">
                        <span>
                                <i></i>男</span>
                    </label>
                    <label class="fancy-radio">
                        <input name="gender" value="female" type="radio">
                        <span>
                                <i></i>女</span>
                    </label>
                </div>
                <br>

            </div>
            <div class="box-body col-md-6">
                <label for="location">用户所在地</label>
                <input id="location" type="text" class="form-control" placeholder="输入用户所在地">
                <br>
                <label for="email">邮箱</label>
                <input id="email" type="text" class="form-control" placeholder="输入用户邮箱">
                <br>
                <label for="education">文化程度</label>
                <select id="education" class="form-control">
                    <option value="小学">小学</option>
                    <option value="初中">初中</option>
                    <option value="高中">高中</option>
                    <option value="本科">本科</option>
                    <option value="硕士">硕士</option>
                    <option value="博士">博士</option>
                </select>
                <br>
                <label for="job">职业</label>
                <input id="job" type="text" class="form-control" placeholder="输入用户职业">
                <br>
                <label>婚姻状况</label>
                <div>
                    <label class="fancy-radio">
                        <input name="marry" value="yes" type="radio">
                        <span>
                                <i></i>已婚</span>
                    </label>
                    <label class="fancy-radio">
                        <input name="marry" value="no" type="radio">
                        <span>
                                <i></i>未婚</span>
                    </label>
                </div>
            </div>

            <br>
        </div>
        <div >
            <button id="submit" type="submit" class="btn btn-primary btn-block">确定</button>
        </div>
</form>
</div>
</body>
<!--在这里定义或者引用你的script-->
<div th:fragment="script">
    <script>;
        $('#submit').click(function(){
            $.post("/user/add",
                {
                    telephone:$("#telephone").val(),
                    nickname:$("nickname").val(),
                    realName:$("realName").val(),
                    sex:$("gender").val(),
                    location:$("location").val(),
                    email:$("email").val(),
                    education:$("education").val(),
                    job:$("job").val(),
                    marry:$("marry").val(),
                },
                function (data,status) {
                    // alert("sss");
                });
        })
    </script>
</div>

</html>